package vn.elca.training.important_classes_excercise;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Vector;

public class Question3 {
	public static void main(String[] args) {
		HashMap<String, Integer> carPrices = new HashMap<String, Integer>();
		carPrices.put("BMW", 70000);
		carPrices.put("Kia-Forte", 29000);
		carPrices.put("Toyota-Camry", 60000);
		carPrices.put("Lexus", 90000);
		carPrices.put("Honda-civic", 31000);
		carPrices.put("Audi", 90000);
		List<String> sortedCarBrands = new Vector<String>();
		//List<String> sortedCarBrands = new ArrayList<String>();    // can use ArrayList instead Vector
		sortedCarBrands.addAll(carPrices.keySet());      // Answer line 1
		System.out.println(sortedCarBrands.toString());
		Collections.sort(sortedCarBrands);		         // Answer line 2
		System.out.println(sortedCarBrands.toString());

	}
}
